const _import =
  process.env.NODE_ENV === 'production'
    ? file => () => import('@/views/modules/' + file + '.vue')
    : file => require('@/views/modules/' + file + '.vue').default

export default [
  {
    path: 'market',
    component: _import('market/market'),
    name: 'market',
    meta: { title: '标签超市', noContentBox: true, permission: 'front:page:market' }
  },
  {
    path: 'market/watch',
    component: _import('market/list/watch'),
    name: 'market-watch-list',
    meta: { title: '我的关注', noContentBox: true, permission: 'front:page:market' }
  },
  {
    path: 'market/album',
    component: _import('market/list/album'),
    name: 'market-album-list',
    meta: { title: '我的标签专辑', noContentBox: true, permission: 'front:page:market' }
  },
  {
    path: 'market/share',
    component: _import('market/list/share'),
    name: 'market-share-list',
    meta: { title: '我的分享', noContentBox: true, permission: 'front:page:market' }
  },
  {
    path: 'market/rate',
    component: _import('market/list/rate'),
    name: 'market-rate-list',
    meta: { title: '我的评价', noContentBox: true, permission: 'front:page:market' }
  },
  {
    path: 'market/history',
    component: _import('market/list/history'),
    name: 'market-history-list',
    meta: { title: '我的浏览历史', noContentBox: true, permission: 'front:page:market' }
  },
  {
    path: 'market/search',
    component: _import('market/search'),
    name: 'market-search',
    meta: { title: '搜索结果', noContentBox: true, permission: 'front:page:market' }
  },
  {
    path: 'market/tag/:id',
    component: _import('market/tag/tag'),
    name: 'market-tag',
    meta: { title: '标签明细', multipage: true, permission: 'front:page:market' }
  },
  {
    path: 'market/album/:id',
    component: _import('market/album/album'),
    name: 'market-album',
    meta: { title: '专辑明细', permission: 'front:page:market' }
  }
]
